#include "Type.hpp"

/* ******************************************************
 ******************** Type
 * ****************************************************** */
void Type::show(){
	std::cout << theType;
}

bool Type::operator==( const Type &toCompare ){
	if (this->theType != toCompare.theType )  {
		return false;
	}
	return true;
}

bool Type::operator!=(const Type &toCompare ) {
	return !( *this == toCompare );
}

Type * Type::clone() {
	Type * t = new Type;
	t->theType = this->theType;
	return t;
	//return this;
}

bool Type::isOfBaseType(){
	switch ( this->theType ) {
		case TYPE_INTEGER:	
		case TYPE_REAL:	
		case TYPE_BOOLEAN:	
		case TYPE_CHAR:
		case TYPE_TEMP:
		case TYPE_STRING: return true;
	}
	return false;
}

bool Type::isApplicable(CodeInstruction operation) {
	return false;
}
